package com.ruoyi.ade.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ade.mapper.AdeKnowledgeRecordMapper;
import com.ruoyi.ade.domain.AdeKnowledgeRecord;
import com.ruoyi.ade.service.IAdeKnowledgeRecordService;

/**
 * ADE KB RecordsService业务层处理
 * 
 * @author wxh
 * @date 2025-07-07
 */
@Service
public class AdeKnowledgeRecordServiceImpl implements IAdeKnowledgeRecordService 
{
    @Autowired
    private AdeKnowledgeRecordMapper adeKnowledgeRecordMapper;

    /**
     * 查询ADE KB Records
     * 
     * @param id ADE KB Records主键
     * @return ADE KB Records
     */
    @Override
    public AdeKnowledgeRecord selectAdeKnowledgeRecordById(Long id)
    {
        return adeKnowledgeRecordMapper.selectAdeKnowledgeRecordById(id);
    }

    /**
     * 查询ADE KB Records列表
     * 
     * @param adeKnowledgeRecord ADE KB Records
     * @return ADE KB Records
     */
    @Override
    public List<AdeKnowledgeRecord> selectAdeKnowledgeRecordList(AdeKnowledgeRecord adeKnowledgeRecord)
    {
        return adeKnowledgeRecordMapper.selectAdeKnowledgeRecordList(adeKnowledgeRecord);
    }

    /**
     * 新增ADE KB Records
     * 
     * @param adeKnowledgeRecord ADE KB Records
     * @return 结果
     */
    @Override
    public int insertAdeKnowledgeRecord(AdeKnowledgeRecord adeKnowledgeRecord)
    {
        adeKnowledgeRecord.setCreateTime(DateUtils.getNowDate());
        return adeKnowledgeRecordMapper.insertAdeKnowledgeRecord(adeKnowledgeRecord);
    }

    /**
     * 修改ADE KB Records
     * 
     * @param adeKnowledgeRecord ADE KB Records
     * @return 结果
     */
    @Override
    public int updateAdeKnowledgeRecord(AdeKnowledgeRecord adeKnowledgeRecord)
    {
        return adeKnowledgeRecordMapper.updateAdeKnowledgeRecord(adeKnowledgeRecord);
    }

    /**
     * 批量删除ADE KB Records
     * 
     * @param ids 需要删除的ADE KB Records主键
     * @return 结果
     */
    @Override
    public int deleteAdeKnowledgeRecordByIds(Long[] ids)
    {
        return adeKnowledgeRecordMapper.deleteAdeKnowledgeRecordByIds(ids);
    }

    /**
     * 删除ADE KB Records信息
     * 
     * @param id ADE KB Records主键
     * @return 结果
     */
    @Override
    public int deleteAdeKnowledgeRecordById(Long id)
    {
        return adeKnowledgeRecordMapper.deleteAdeKnowledgeRecordById(id);
    }
}
